package com.huse.pigservice.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author xinxin
 * @since 2021-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Pig对象", description="")
public class Pig implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "猪的唯一标识")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "猪的耳朵标识")
    private String pigId;

    @ApiModelProperty(value = "猪的生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty(value = "猪的类型：1-后备母猪；2-后备公猪；3-生产公猪；4-怀孕母猪；5-空怀母猪；6-仔猪；7-育肥猪")
    private Integer type;

    @ApiModelProperty(value = "猪的father_id")
    private String fatherId;

    @ApiModelProperty(value = "猪的mother_id")
    private String motherId;

    @ApiModelProperty(value = "猪的注释位置id")
    private String piggeryId;

    @ApiModelProperty(value = "猪在栏状态：1-健康；2-生病用药期；3-休整期（此期间的猪不能售卖）")
    private Integer pigStatus;

    @ApiModelProperty(value = "猪的性别")
    private boolean sex;

    @ApiModelProperty(value = "注册时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "猪的后代")
    List<Pig> children;

}
